Switch to use NetAddress for peer addresses#85
Closed
tnull wants to merge 3 commits intolightningdevkit:mainfrom
Closed
Switch to use NetAddress for peer addresses#85tnull wants to merge 3 commits intolightningdevkit:mainfrom
tnull wants to merge 3 commits intolightningdevkit:mainfrom
Conversation
This was referenced May 3, 2023
ba818f2 to
29a7c9a
Compare
04032ec to
38c5707
Compare
Collaborator
Author
38c5707 to
3042d2b
Compare
Collaborator
Author
|
Rebased on main after #84 landed. |
This was referenced May 11, 2023
c1ad3d0 to
3f9d68e
Compare
Collaborator
Author
|
Rebased after #56 has been merged. |
3f9d68e to
abfda94
Compare
Collaborator
Author
|
Rebased on main. |
abfda94 to
8f9229c
Compare
8f9229c to
a87508c
Compare
Collaborator
Author
Thanks, they are actually all signed, just to a different user ID. Not exactly sure why Github is showing as unverified, it knows both email addresses... Will need to look into that. |
9780c83 to
67f4811
Compare
Collaborator
Author
|
Squashed commits and included the following changes: diff --git a/bindings/ldk_node.udl b/bindings/ldk_node.udl
index d31865a..b767de0 100644
--- a/bindings/ldk_node.udl
+++ b/bindings/ldk_node.udl
@@ -74,5 +74,4 @@ enum NodeError {
"InvoiceCreationFailed",
"PaymentFailed",
- "PeerInfoNotFound",
"ChannelCreationFailed",
"ChannelClosingFailed",
diff --git a/src/error.rs b/src/error.rs
index 7fdd9d6..1d59fc0 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -16,6 +16,4 @@ pub enum Error {
/// An attempted payment has failed.
PaymentFailed,
- /// A given peer info could not be found.
- PeerInfoNotFound,
/// A channel could not be opened.
ChannelCreationFailed,
@@ -71,5 +69,4 @@ impl fmt::Display for Error {
Self::InvoiceCreationFailed => write!(f, "Failed to create invoice."),
Self::PaymentFailed => write!(f, "Failed to send the given payment."),
- Self::PeerInfoNotFound => write!(f, "Failed to resolve the given peer information."),
Self::ChannelCreationFailed => write!(f, "Failed to create channel."),
Self::ChannelClosingFailed => write!(f, "Failed to close channel."),
diff --git a/src/lib.rs b/src/lib.rs
index 0b8e7eb..75e74cf 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1608,5 +1608,8 @@ async fn do_connect_peer(
let socket_addr = addr
.to_socket_addrs()
- .map_err(|_| Error::PeerInfoNotFound)?
+ .map_err(|e| {
+ log_error!(logger, "Failed to resolve network address: {}", e);
+ Error::InvalidNetAddress
+ })?
.next()
.ok_or(Error::ConnectionFailed)?; |
While we're still blocked on upstream changes, we now switch our peer info to use a newtype around `NetAddress` so that we won't have to break serialization compatibility when the upstream changes becom available post-0.1.
67f4811 to
63f3105
Compare
wpaulino
approved these changes
May 23, 2023
Collaborator
Author
|
Closing manually as the merge somehow didn't close this. |
tnull
added a commit
to tnull/ldk-node
that referenced
this pull request
May 23, 2023
This was referenced May 23, 2023
joostjager
pushed a commit
to joostjager/ldk-node
that referenced
this pull request
Jan 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #11,
based on #84.We so far waited for lightningdevkit/rust-lightning#2056 to be resolved. However, as it didn't happen in time for LDK 0.0.115, we now switch our peer info to use a newtype around
NetAddressso that we won't have to break serialization compatibility when the upstream changes become available post-0.1.